From: Roger Pau Monne Date: Wed, 17 Jan 2018 08:34:19 +0000 (+0000) Subject: xen/pvshim: map vcpu_info earlier for APs X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~752 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aeb318351a77c8556025fced110ce387e4dfb93e;p=xen.git xen/pvshim: map vcpu_info earlier for APs Or else init_percpu_time is going to dereference a NULL pointer when trying to access vcpu_info. Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 63ca053b35..2cdd431b5f 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -349,6 +349,9 @@ void start_secondary(void *unused) else microcode_resume_cpu(cpu); + if ( xen_guest ) + hypervisor_ap_setup(); + smp_callin(); init_percpu_time(); @@ -376,9 +379,6 @@ void start_secondary(void *unused) cpumask_set_cpu(cpu, &cpu_online_map); unlock_vector_lock(); - if ( xen_guest ) - hypervisor_ap_setup(); - /* We can take interrupts now: we're officially "up". */ local_irq_enable(); mtrr_ap_init();